Skip to content

Fix build & pkg_resources fix#137

Merged
pwalczysko merged 5 commits intoome:masterfrom
pwalczysko:fix-build-wills-fix
Feb 17, 2026
Merged

Fix build & pkg_resources fix#137
pwalczysko merged 5 commits intoome:masterfrom
pwalczysko:fix-build-wills-fix

Conversation

@pwalczysko
Copy link
Member

@pwalczysko pwalczysko commented Feb 17, 2026

This PR includes commits from #136.

  • pinned the setuptools==v71.1.0 in the test environment to circumvent

File "/home/runner/work/omego/omego/.tox/py312/lib/python3.12/site-packages/setuptools/command/test.py", line 47, in run raise RuntimeError("Support for the test command was removed in Setuptools 72")

  • went for python 3.10 to fix the no module named imp errror (see Details below for the error)
  • NB: Although the setuptools are pinned (in order to be able to use the test feature which is removed in latest setuptools, this PR still contains valid test of replace pkg_resources with importlib.resources #136
  • Removed the tests concerning the download of artifacts from Jenkins -> they were all failing (download of released versions is passing), I believe because the jenkins url has changed. Imho, this is a feature which did not work for a long time.
Details

Traceback (most recent call last):
  File "/home/runner/work/omego/omego/setup.py", line 105, in <module>
    setup(name='omego',
  File "/home/runner/work/omego/omego/.tox/py312/lib/python3.12/site-packages/setuptools/__init__.py", line 108, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/omego/omego/.tox/py312/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 184, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/omego/omego/.tox/py312/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
    dist.run_commands()
  File "/home/runner/work/omego/omego/.tox/py312/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 970, in run_commands
    self.run_command(cmd)
  File "/home/runner/work/omego/omego/.tox/py312/lib/python3.12/site-packages/setuptools/dist.py", line 956, in run_command
    super().run_command(command)
  File "/home/runner/work/omego/omego/.tox/py312/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
    cmd_obj.run()
  File "/home/runner/work/omego/omego/.tox/py312/lib/python3.12/site-packages/setuptools/command/test.py", line 223, in run
    self.run_tests()
  File "/home/runner/work/omego/omego/setup.py", line 81, in run_tests
    import pytest
  File "/home/runner/work/omego/omego/.eggs/pytest-4.6.11-py3.12.egg/pytest.py", line 8, in <module>
    from _pytest.assertion import register_assert_rewrite
  File "/home/runner/work/omego/omego/.eggs/pytest-4.6.11-py3.12.egg/_pytest/assertion/__init__.py", line 13, in <module>
    from _pytest.assertion import rewrite
  File "/home/runner/work/omego/omego/.eggs/pytest-4.6.11-py3.12.egg/_pytest/assertion/rewrite.py", line 9, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'
py312: exit 1 (11.88 seconds) /home/runner/work/omego/omego> bash ./ci-build pid=3159

cc @will-moore

@pwalczysko pwalczysko changed the title Fix build wills fix Fix build & pkg_resources fix Feb 17, 2026
@pwalczysko
Copy link
Member Author

pwalczysko commented Feb 17, 2026

The fix in this PR is capable of fixing the failing build on idr-gallery.

When I point to my fork of omero-test-infra and point this fork to this branch of omego, then the build on idr-gallery gets to the point (unfortunately only to fail later on flake8 errors, but this is not related):

  Created wheel for omego: filename=omego-0.7.1.dev0-py3-none-any.whl size=36092 sha256=7ba3971d42bb5c264153db3c21f58189a38ac2a9a762676ce8cd97a91bb1c828
  Stored in directory: /tmp/pip-ephem-wheel-cache-6vreagek/wheels/8a/7e/20/f2faeb6a2c21abd547a844f6a2c9a8b0e1583b841924566616
Successfully built omego
Installing collected packages: omego
  Attempting uninstall: omego
    Found existing installation: omego 0.7.0
    Uninstalling omego-0.7.0:
      Successfully uninstalled omego-0.7.0
Successfully installed omego-0.7.1.dev0

Notice:  A new release of pip is available: 23.2.1 -> 26.0.1
Notice:  To update, run: python3.12 -m pip install --upgrade pip
2026-02-17 18:32:56,635 [omego.artifa] INFO  Checking https://downloads.openmicroscopy.org/omero/5.6.16/artifacts/OMERO.java-5.6.16-ice36.zip
2026-02-17 18:32:56,636 [omego.fileut] INFO  Downloading https://downloads.openmicroscopy.org/omero/5.6.16/artifacts/OMERO.java-5.6.16-ice36.zip
2026-02-17 18:32:58,273 [omego.artifa] INFO  Unzipping OMERO.java-5.6.16-ice36.zip

Whereas the build without this PR is ending with:

Successfully built omego yaclifw
Installing collected packages: six, yaclifw, omego
Successfully installed omego-0.7.0 six-1.17.0 yaclifw-0.2.0

Notice:  A new release of pip is available: 23.2.1 -> 26.0.1
Notice:  To update, run: python3.12 -m pip install --upgrade pip
Traceback (most recent call last):
  File "/opt/omero/web/venv3/bin/omego", line 5, in <module>
    from omego.main import entry_point
  File "/opt/omero/web/venv-3.12/lib64/python3.12/site-packages/omego/main.py", line 39, in <module>
    from .version import Version
  File "/opt/omero/web/venv-3.12/lib64/python3.12/site-packages/omego/version.py", line 25, in <module>
    from pkg_resources import resource_string
ModuleNotFoundError: No module named 'pkg_resources'

Copy link
Member

@will-moore will-moore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks

@pwalczysko
Copy link
Member Author

I have it now really green on https://github.com/pwalczysko/idr-gallery/actions/runs/22114791103.

The flake8 commit is quite useful too, see IDR/idr-gallery@db192d9

@pwalczysko pwalczysko merged commit 6e9810b into ome:master Feb 17, 2026
1 check passed
@pwalczysko pwalczysko deleted the fix-build-wills-fix branch February 17, 2026 20:41
@jburel
Copy link
Member

jburel commented Feb 17, 2026

It will probably be better to disable the tests instead of removing them

@pwalczysko
Copy link
Member Author

It will probably be better to disable the tests instead of removing them

I will look into it and open a PR

@jburel
Copy link
Member

jburel commented Feb 18, 2026

Thanks the functionality is still in the code :)

@pwalczysko pwalczysko mentioned this pull request Feb 18, 2026
@pwalczysko
Copy link
Member Author

It will probably be better to disable the tests instead of removing them

@jburel
Opened #141 for this, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants